From: Jonas Dreßler Date: Mon, 9 Sep 2019 15:06:55 +0000 (+0200) Subject: extensionPrefs: Connect to ExtensionStateChanged after building UI X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~154 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=17fa5a2db45e66e4b0a38952cc8a0f0b791d431f;p=gnome-shell.git extensionPrefs: Connect to ExtensionStateChanged after building UI Since we manipulate parts of the UI (like the switch) in this signal handler, let's only connect it after setting up the UI. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/705 --- diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 4125605b9..1a0783bdd 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -567,6 +567,10 @@ class ExtensionRow extends Gtk.ListBoxRow { this._extension = extension; this._prefsModule = null; + this.connect('destroy', this._onDestroy.bind(this)); + + this._buildUI(); + this._extensionStateChangedId = this._app.shellProxy.connectSignal( 'ExtensionStateChanged', (p, sender, [uuid, newState]) => { if (this.uuid !== uuid) @@ -577,10 +581,6 @@ class ExtensionRow extends Gtk.ListBoxRow { this._switch.state = state; this._switch.sensitive = this._canToggle(); }); - - this.connect('destroy', this._onDestroy.bind(this)); - - this._buildUI(); } get uuid() {